<%@ page import="list.model.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    User user = new User(1);
    user.init();
    String tagTemp = request.getParameter("tag");
    int tag = tagTemp == null ? 0 : Integer.parseInt(tagTemp);
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AddressList</title>
    <link rel="stylesheet" type="text/css" href="style/reset.css">
    <link rel="stylesheet" type="text/css" href="style/style.css">
    <link rel="stylesheet" href="style/bootstrap.min.css">
    <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<header>
    <div id="title">通讯录</div>
    <input class="admin" type="text" value="<%=user.getId()%>" readonly>
    <input type="hidden" id="user_id" value="<%=user.getUser_id()%>">
</header>
<section>
    <aside class="side-col">
        <nav class="group">
            <%@ include file="module/tagList.jsp" %>
        </nav>
    </aside>
    <article class="main-col">
        <div class="standard">
            <a href="?opt=newUser&tag=<%=tag%>">
                <%if (tag > 0) {%>
                <a href="module/route.jsp?opt=insert&key=contact&tag=<%=tag%>"><button class="btn btn-info" type="button" id="insertUser">新建联系人</button></a>
                <%}%>
            </a>
        </div>
        <%@ include file="module/userList.jsp" %>
    </article>
</section>


<footer>

</footer>

</body>
</html>
<!--
需要后台配合实现的功能：
1.三秒半自动保存
-->